package com.clouddot.baipai.infrastructure.environment.initial;


import com.clouddot.baipai.infrastructure.environment.Environment;
import com.clouddot.baipai.ui.util.file.fileUtil;
import com.clouddot.baipai.model.TasksRepository;
import com.clouddot.baipai.model.netConnect;
import com.clouddot.baipai.presenter.appPresenter;
import com.clouddot.baipai.ui.util.Ftp.FTPUtil;

public class InitialHardware extends InitialBase
{
	private Environment Environment;
	public InitialHardware(Environment Environment)
	{
		super(Environment);
		this.Environment = Environment;
	}

	@Override
	public String getName()
	{
		return "初始化io类";
	}

	@Override
	public void initial() throws Exception
	{
		super.initial();
		Environment.appPresenter = new appPresenter(new TasksRepository());
		Environment.netConnect = netConnect.getInstance();
		Environment.ftpUtil = FTPUtil.getInstance();
		Environment.fileUtil = fileUtil.getInstance();

	}

	@Override
	public void reinitial() throws Exception {
		super.reinitial();
		Environment.appPresenter = new appPresenter(new TasksRepository());
		Environment.netConnect = netConnect.getInstance();
		Environment.ftpUtil = FTPUtil.getInstance();
		Environment.fileUtil = fileUtil.getInstance();

	}
}
